//
//  FirstTableViewCell.m
//  NewProject
//
//  Created by 王嘉琪 on 2017/6/8.
//  Copyright © 2017年 李航飞. All rights reserved.
//

#import "FirstTableViewCell.h"

@implementation FirstTableViewCell
//重写cell创建方法
-(instancetype)initWithResueIdentifier:(NSString*)identifier;{
    self = [super initWithStyle:0 reuseIdentifier:identifier];
    if (self) {
        [self setUpView];
    }
    return self;
}
- (void)setUpView{
    _messageLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, [UIScreen mainScreen].bounds.size.width/4-15, 50)];
    //    _messageLabel.backgroundColor=[UIColor redColor];
    self.backgroundColor=LINE_COLOE_251;
    UIView *view=[[UIView alloc] initWithFrame:CGRectMake(0, 49, self.frame.size.width, 1)];
    
    view.backgroundColor=LINE_COLOE_245;
    
    _hotImg = [[UIImageView alloc] initWithFrame:CGRectMake( [UIScreen mainScreen].bounds.size.width/4-40, 0, 25, 25)];
    [_hotImg setImage:[UIImage imageNamed:@"hotx2"]];
    
    
    [self addSubview:view];
    [self addSubview:_messageLabel];
    
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    if (self.isShowImage) {
        [_messageLabel addSubview:_hotImg];
    }
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
